﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HomeBudget
{
    class RecurringEarning : Earning, IRecurringItem
    {
        public RecurringInterval RecurringInterval
        { get; set; }

        public RecurringEarning(decimal amount, string name, Category category, RecurringInterval recurringInterval) : base(amount, name, category)
        {
            this.RecurringInterval = recurringInterval;
        }

        public override string ToString()
        {
            StringBuilder returnString = new StringBuilder(base.ToString());
            returnString.AppendFormat("-{0}-{1}", this.Category, this.RecurringInterval);
            return returnString.ToString();
        }
    }
}
